<?php

namespace app\api\model;

use think\Model;
use think\model\concern\SoftDelete;

class ArtCollect extends Model
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = 0;
    public static function hasCollect($art_id)
    {
        $res = self::where(['user_id' => getUid(), 'art_id' => $art_id, 'delete_time' => 0])->find();
        if ($res) return true;
        return false;
    }
}
